Check out of bounds for inactive type1 packet#21
Merged
magnusedgeware merged 1 commit intomasterfrom Apr 15, 2025
Merged
Conversation
unitTests/UnitTest24.cpp
Outdated
| ElasticFrameMessages result = myEFPReceiver->receiveFragmentFromPtr(reinterpret_cast<uint8_t*>(&lType1Frame), FRAME_SIZE, 0); | ||
| EXPECT_EQ(result, ElasticFrameMessages::noError); | ||
|
|
||
| // test with corrup type1 packet |
Contributor
There was a problem hiding this comment.
Suggested change
| // test with corrup type1 packet | |
| // test with corrupt type1 packet |
tomasoh-ateliere
approved these changes
Apr 14, 2025
Contributor
tomasoh-ateliere
left a comment
There was a problem hiding this comment.
Well spotted! Check if this might be an issue for other frame types as well.
db2100b to
93c3012
Compare
Contributor
Author
|
I found that the unit tests did not work as expected so I improved them. |
tomasoh-ateliere
approved these changes
Apr 15, 2025
unitTests/UnitTest24.cpp
Outdated
| std::generate(garbage.begin(), garbage.end(), | ||
| [&]() { return static_cast<uint8_t>(dis(gen)); }); | ||
|
|
||
| ElasticFrameMessages info = myEFPReceiver->receiveFragment(garbage, 0); |
bc2947c to
9a6c166
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.